FROM centos:7
MAINTAINER steven

RUN yum update -y  && yum install -y wget \
				    make \
				    sed \
                    vim \
                    pecl \
                    composer \
					gcc \
					gcc-c++ \
					gd \
					gd-devel \
					gmp-devel \
					epel-release \
					net-tools \
					ntpdate \
					ntp \
					openssh-clients \
					curl \
					crontabs \
					git \
					httpd \
					squid
RUN yum install nginx -y
RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN yum makecache fast

RUN yum install -y --enablerepo=webtatic-testing php71w-fpm php71w-opcache php71w-cli php71w-gd php71w-imap php71w-mysqlnd php71w-mbstring php71w-mcrypt php71w-pdo php71w-pecl-apcu php71w-pecl-mongodb php71w-pecl-redis php71w-pgsql php71w-xml php71w-xmlrpc php71w-devel mod_php71w

RUN sed -i 's/http_access deny all/#http_access deny all/g' /etc/squid/squid.conf

RUN cd /tmp && wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py \
    && python get-pip.py

RUN pip install supervisor

EXPOSE 80 443 3128

WORKDIR  /usr/share/nginx/html/